home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 7
/
Gekikoh Dennoh Club Vol. 7 (Japan).7z
/
Gekikoh Dennoh Club Vol. 7 (Japan) (Track 01).bin
/
games
/
saru
/
g1000.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-06-15
|
19KB
|
1,104 lines
/*
CD-DA直接もぐらたたき?
by 電魔団\shoryu 1999 for G7
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <basic0.h>
#include <iocslib.h>
#include <doslib.h>
extern char PCM_1005_001[], //ウキやっつけ音
PCM_1005_003[], //GAMEOVER音
PCM_AXE0004[]; //からぶり音
extern int PCMSIZE_1005_001,PCMSIZE_1005_003,PCMSIZE_AXE0004; //サイズ
typedef struct {
int start_addr; //アブソリュートCD-ROM開始アドレス
int track_len; //アブソリュートトラック長
} TRACK;
//CD本来のTOC情報
TRACK Track[100]; //[0]は全体、[普通に曲番号]が入る
//インデックスの曲番号に「0xaa」てのがあるので注意
/*
unsigned char Toc[804]={ 0x43,0, //TOC読み込みコマンド&データバッファ
0,0,0,0,
2,0x3,0x24,0};
*/
unsigned short Toc[804/2]={ 0x4300, //TOC読み込みコマンド&データバッファ
0,0,
0x0203,0x2400};
//ウキ音(L000+R000+L050+R050+)のvTRACK
//CD-DAアブショリュートアドレス、アブソリュート長
#define VTRACKS (18*2)
TRACK vTrack[VTRACKS]={ //?=LorR
{0,74}, {75,74}, //?000
{150,74}, {225,74}, //?050
{300,74}, {375,74}, //?100
{450,74}, {525,74}, //?150
{600,74}, {675,74}, //?200
{750,74}, {825,74}, //?250
{900,74}, {975,74}, //?300
{1050,74}, {1125,74}, //?350
{1200,74}, {1275,74}, //?400
{1350,74}, {1425,74}, //?450
{1500,74}, {1575,74}, //?500
{1650,74}, {1725,74}, //?550
{1800,74}, {1875,74}, //?600
{1950,74}, {2025,74}, //?650
{2100,74}, {2175,74}, //?700
{2250,74}, {2325,74}, //?750
{2400,74}, {2475,74}, //?800
{2550,74}, {2625,74} //?850
};
char *Guide[VTRACKS]={
// "ASDF JKL;",
" F J ", //L000
" F J ", //R000
" F ", //L050
" J ", //R050
" F ", //L100
" J ", //R100
" DF ", //L150
" JK ", //R150
" DF ", //L200
" JK ", //R200
" D ", //L250
" K ", //R250
" D ", //L300
" K ", //R300
" D ", //L350
" K ", //R350
" SD ", //L400
" KL ", //R400
" SD ", //L450
" KL ", //R450
" S ", //L500
" L ", //R500
" S ", //L550
" L ", //R550
" S ", //L600
" L ", //R600
"AS ", //L650
" L;", //R650
"AS ", //L700
" L;", //R700
"A ", //L750
" ;", //R750
"A ", //L800
" ;", //R800
"A ", //L850
" ;" //R850
};
char *DirInfo[VTRACKS]={
" ← 00度 ",
" 00度 → ",
" ← 05度 ",
" 05度 → ",
" ← 10度 ",
" 10度 → ",
" ← 15度 ",
" 15度 → ",
" ←← 20度 ",
" 20度 →→ ",
" ←← 25度 ",
" 25度 →→ ",
" ←← 30度 ",
" 30度 →→ ",
" ←← 35度 ",
" 35度 →→ ",
" ←← 40度 ",
" 40度 →→ ",
" ←←← 45度 ",
" 45度 →→→ ",
" ←←← 50度 ",
" 50度 →→→ ",
" ←←← 55度 ",
" 55度 →→→ ",
" ←←← 60度 ",
" 60度 →→→ ",
" ←←← 65度 ",
" 65度 →→→ ",
"←←←← 70度 ",
" 70度 →→→→",
"←←←← 75度 ",
" 75度 →→→→",
"←←←← 80度 ",
" 80度 →→→→",
"←←←← 85度 ",
" 85度 →→→→"
};
typedef struct {
int kg,kd; //トリガとなるキーグループとキーデータ(ビット番号にあらず)
int start_addr; //アブソリュートCD-ROM開始アドレス
int track_len; //アブソリュートトラック長
} TRACKOFF;
//バラバラ再生用トラックオフセット
#define TRACKOFFS (8)
TRACKOFF Troff[TRACKOFFS]={
// キー 開始オフセット 再生時間
{3,0x40, 1000, 50}, //'A'
{3,0x80, 1075, 50}, //'S'
{4,0x01, 1150, 50}, //'D'
{4,0x02, 1225, 50}, //'F'
{4,0x10, 1300, 50}, //'J'
{4,0x20, 1375, 50}, //'K'
{4,0x40, 1450, 50}, //'L'
{4,0x80, 1525, 50} //';'
};
typedef struct {
int kb[0x10]; //キー情報
int anskey; //ASDFJKL;=12345678/入力無し=0
} DEVICE;
DEVICE Dev,oDev;
int prohiTime; //ASDF入力禁止カウンタ
//ASDFJKL;に対応するvTrackの番号
int HitTable_A[]= {34,32,30,28,26,-1}; //A
int HitTable_S[]= {28,26,24,22,20,18,16,-1}; //S
int HitTable_D[]= {18,16,14,12,10, 8, 6,-1}; //D
int HitTable_F[]= { 8, 6, 4, 2, 0, 1,-1}; //F
int HitTable_J[]= { 0, 1, 3, 5, 7, 9,-1}; //J
int HitTable_K[]= { 7, 9,11,13,15,17,19,-1}; //K
int HitTable_L[]= {17,19,21,23,25,27,29,-1}; //L
int HitTable_SC[]={27,29,31,33,35,-1}; //;
int *HitTable[8+1]={
NULL, //NULL
HitTable_A,HitTable_S,HitTable_D,HitTable_F,
HitTable_J,HitTable_K,HitTable_L,HitTable_SC
};
#define TRUE (0)
#define FALSE (-1)
int exit_flag=FALSE;
int DB=0; //デバッグ情報1=ON/0=OFF
int HINT=0; //
//システム用
int SCSI_ID; //CD-ROMドライブのSCSI-ID
int CDDA_TRACK; //ウキのデータが入ったCDDAトラック番号
int PlayStartTime; //今鳴っているトラックを演奏開始した時間
int PlayNumber; // トラック番号
int AnswerTime; //回答制限時間
int Score; //得点
int MissCount; //ミスカウント
int gameCondition; //現在のゲームコンディション
int gameLevel; //ゲームレベル
int AnswerTimeTBL[]={500,400,150,300,250,100}; // 1/100タイマ
int prohiTimeTBL[]={90,90,25,50,40,25}; // V-sync
enum GCND {
ALL_INIT,
DEMO_INIT,
DEMO,
COUNTDOWN_INIT,
COUNTDOWN,
PLAY_TRACK,
WAIT_ANSWER,
GOOD_ANSWER_INIT,
GOOD_ANSWER,
BAD_ANSWER_INIT,
BAD_ANSWER,
TIMEOUT_ANSWER_INIT,
TIMEOUT_ANSWER,
WAIT_NEXT,
LEVEL_CONTROL,
GAMEOVER_INIT,
GAMEOVER
};
unsigned short TPALET0; //画面フラッシュ用:通常=0
int HiScore;
int totalCnt, hitCnt, outCnt;
int karaburiCnt;
int PrintTitle()
{
locate(0,0); printf(" ←↑さるばとる↑→ ");
return(0);
}
int PrintInfo()
{
locate(0,0); printf("おさるの出現数:%02d",totalCnt);
locate(0,1); printf("やった数 :%02d",hitCnt);
locate(0,2); printf("やられた数 :%02d",outCnt);
return(0);
}
int PrintSubInfo(fnc)
int fnc; //0=消去・1=表示
{
int rt;
locate(0,3);
switch(fnc){
case 0:
printf(" ");
break;
case 1:
if( prohiTime ){
printf("%03d",prohiTime-1);
}
else{
rt=(PlayStartTime+AnswerTime)-ONTIME();
printf("%03d",rt);
}
break;
}
return(0);
}
int PrintAns()
{
locate(0+7,4); printf(Guide[PlayNumber]);
return(0);
}
int PrintDemo(fn)
int fn;
{
char *mes[2]={
" ",
"DEMONSTRATION"
};
locate(0+4,5); printf(mes[fn]);
return(0);
}
int PrintPush(fn)
int fn;
{
char *mes[2]={
" ",
"PUSH ASDF-key"
};
locate(0+4,5); printf(mes[fn]);
return(0);
}
int PrintDirInfo()
{
locate(0,6); printf(DirInfo[PlayNumber]);
return(0);
}
int DevMan()
{
int kg;
// A S D F J K L ;
int akg[9]={0, 3, 3, 4, 4, 4, 4, 4, 4},
akb[9]={0, 0x40,0x80,0x01,0x02, 0x10,0x20,0x40,0x80};
oDev=Dev;
for( kg=0; kg<0x10; kg++ ){
Dev.kb[kg]=BITSNS(kg);
}
//ASDFJKL;キー判定
Dev.anskey=0;
if( prohiTime==0 ){
for( kg=1;kg<=8;kg++ ){
if( Dev.kb[akg[kg]]==akb[kg] && oDev.kb[akg[kg]]==0 ){
Dev.anskey=kg;
}
}
}
else{
prohiTime--;
}
return(0);
}
int SyncMan()
{
int ssp;
volatile unsigned char *gpip=(unsigned char *)0xE88001;
unsigned short *tpal0=(unsigned short *)0xe82200;
ssp=B_SUPER(0);
if( !((*gpip)&0x10) ){
while( !((*gpip)&0x10) );
}
while( (*gpip)&0x10 );
*tpal0=TPALET0;
B_SUPER(ssp);
return(0);
}
int TOCRead(scsi_id)
int scsi_id;
{
unsigned char buf[256]; //@@かなり適当
unsigned char *toc;
int retry;
int st;
int res=0;
//使えるかどうかチェック inquiry
//メディアチェック testunit
if( S_SELECT(scsi_id)!=0 ){ //SCSI-ID
res=-1;
goto quick_exit;
}
retry=0;
while( (st=S_CMDOUT(10,Toc))!=0 ){retry++;} //コマンド発行
printf("cmd-out:%d\n",retry);
printf("ST:%x\n",st);
retry=0;
while( (st=S_DATAIN(sizeof(Toc),Toc))!=0 ){
printf("<%d>",st);
retry++;
/*
S_DATAIN()の戻り値でなく、
入力バッファの中身を見て判断するしかないのか?
*/
if( Toc[0]!=0x43 ){
printf("バッファ更新\n");
break;
}
if( retry==15 ){
printf("S_DATAINでエラー\n");
res=-1;
goto quick_exit;
break;
}
}
printf("DT-IN retry=%d\n",retry);
printf("ST:%x\n",st);
retry=0;
while( (st=S_STSIN(buf))!=0 ){ //ステータスインフェーズ
retry++;
if( retry==15 ){
printf("S_STSINでエラー\n");
res=-2;
goto quick_exit;
break;
}
}
printf("ST-IN retry=%d\n",retry);
printf("ST:%x\n",st);
S_MSGIN(buf); //メッセージインフェーズ
{
int i,n,tr;
int toc2,toc3;
toc=(unsigned char *)Toc; //@@おのれ
toc2=*(toc+2);
toc3=*(toc+3);
printf("TOCデータ長:%02X%02X\n",*(toc+0),*(toc+1));
printf("先頭トラック番号:%02X\n",*(toc+2));
printf("最終トラック番号:%02X\n",*(toc+3));
tr=0; Track[tr].start_addr=0; //全体開始
tr=1; Track[tr].start_addr=0;
for( n=0,tr=2,i=toc2;i<=toc3;n++,tr++,i++ ){
int _st,_ab;
Track[tr].start_addr=*(int *)(toc+(4+n*8+4));
_st=*(toc+(4+n*8+2));
_ab=(*(int *)(toc+(4+n*8+4)));
printf("トラック番号:%02x \n",_st);
printf("アブソリュートCD-ROM開始アドレス:%08X\n",_ab);
}
//**/getch();
Track[0].track_len=Track[tr-1].start_addr; //全体終了
for( tr=1,i=toc[2];i<=toc[3];tr++,i++ ){
Track[tr].track_len=Track[tr+1].start_addr-Track[tr].start_addr-1;
}
for( n=0,i=toc[2];i<=toc[3];n++,i++ ){
printf("%d:%x-%x\n",n,Track[n].start_addr,Track[n].track_len);
}
}
quick_exit:
return(res);
}
int AbsPlay(scsi_id,start,len)
int scsi_id,start,len; //アブショリュート値で指定
{
//p.246
// start end
unsigned char cmd[]={ 0xa5,0, 0,0,0,0, 0,0,0,0, 0,0};
unsigned char buf[256]; //@@かなり適当
*(int *)(&cmd[2])=start;
*(int *)(&cmd[6])=len;
//使えるかどうかチェック inquiry
//メディアチェック testunit
S_SELECT(scsi_id); //SCSI-ID
S_CMDOUT(12,cmd); //再生コマンド発行
S_STSIN(buf); //ステータスインフェーズ
S_MSGIN(buf); //メッセージインフェーズ
return(0);
}
/*
指定したvTrackの再生
*/
int PlayVTrack(tn)
int tn;
{
int st,len;
st =Track[CDDA_TRACK].start_addr+vTrack[tn].start_addr;
len=vTrack[tn].track_len;
AbsPlay( SCSI_ID, st, len );
return(0);
}
int Idle()
{
// int k;
if( Dev.kb[0]==0x02 ){ //ESCキー
exit_flag=TRUE;
}
return(0);
}
int Term(mes)
char *mes;
{
OS_CURON();
cls();
KFLUSHIO(0xff);
printf("%s\n",mes);
return(0);
}
int Init(argc,argv)
int argc;
char *argv[];
{
int res=0;
//@@デフォルト
SCSI_ID=6;
CDDA_TRACK=2;
{ //環境変数CDROMが設定されているか?
char *p,buf[256];
p=getenv("CDROM");
if( p!=NULL ){
strcpy(buf,p);
SCSI_ID=atoi(buf);
//SCSI_ID=0はありえるけど
if( SCSI_ID==0 && buf[0]!='0' ){
res=-1;
goto quick_exit;
}
}
}
if( argc!=1 ){ //トラック番号指定あるか
CDDA_TRACK=atoi(argv[1]);
if( CDDA_TRACK==0 ){
res=-1;
goto quick_exit;
}
}
//デバク等
if( argc==3 ){
switch( argv[2][0] ){
case 'h':case 'H':
HINT=1;
break;
case 'd':case 'D':
DB=1;
break;
case '*':
HINT=1;
DB=1;
break;
}
}
srand(ONTIME());
OS_CUROF();
gameCondition=ALL_INIT;
res=TOCRead(SCSI_ID);
//printf("ASDF JKL;で当てよう:ESCキーで終わり");
quick_exit:
return(res);
}
int Demo__Number;
int Demo__local_counter;
int Demo001() //順番に鳴らす
{
#define DEMOPLAY_INTV (150)
if( Dev.anskey!=0 ){
gameCondition=COUNTDOWN_INIT;
}
if( (Demo__local_counter%DEMOPLAY_INTV)==0 ){
PlayNumber=Demo__local_counter/DEMOPLAY_INTV;
PrintAns();
PrintDirInfo();
PlayVTrack(PlayNumber);
goto quick_exit;
}
if( (Demo__local_counter%60)==1 ){
PrintDemo(1);
goto quick_exit;
}
if( (Demo__local_counter%60)==31 ){
PrintDemo(0);
goto quick_exit;
}
if( Demo__local_counter==(DEMOPLAY_INTV*(VTRACKS-1)-1) ){
gameCondition=DEMO_INIT;
goto quick_exit;
}
quick_exit:
Demo__local_counter++;
return(0);
}
int Demo002() //バラバラにはやく鳴らす
{
if( Dev.anskey!=0 ){
gameCondition=COUNTDOWN_INIT;
}
if( (Demo__local_counter%(DEMOPLAY_INTV*3/4))==0 ){
PlayNumber=rand()%VTRACKS;
PrintAns();
PrintDirInfo();
PlayVTrack(PlayNumber);
goto quick_exit;
}
if( (Demo__local_counter%60)==1 ){
PrintDemo(1);
goto quick_exit;
}
if( (Demo__local_counter%60)==31 ){
PrintDemo(0);
goto quick_exit;
}
if( Demo__local_counter==(15*60) ){
gameCondition=DEMO_INIT;
goto quick_exit;
}
//ごくたまに、仮想デモプレーヤーが入力@@まだ
if( (rand()%15)==(rand()%8) ){
//
}
quick_exit:
Demo__local_counter++;
return(0);
}
int Demo003() //しずかに
{
if( Dev.anskey!=0 ){
gameCondition=COUNTDOWN_INIT;
}
if( (Demo__local_counter%60)==1 ){
PrintPush(1);
goto quick_exit;
}
if( (Demo__local_counter%60)==31 ){
PrintPush(0);
goto quick_exit;
}
if( Demo__local_counter==(5*60) ){
gameCondition=DEMO_INIT;
goto quick_exit;
}
quick_exit:
Demo__local_counter++;
return(0);
}
int SM__ALL_INIT()
{
cls();
gameCondition=DEMO_INIT;
return(0);
}
int SM__DEMO_INIT()
{
cls();
PrintTitle();
switch( Demo__Number ){
case 1: Demo__Number=2; break;
case 2: Demo__Number=3; break;
case 3: Demo__Number=4; break;
case 4: Demo__Number=1; break;
default:Demo__Number=4; break;
}
Demo__local_counter=0;
gameCondition=DEMO;
return(0);
}
int SM__DEMO()
{
switch( Demo__Number ){
case 1: Demo001(); break;
case 3: Demo002(); break;
case 2:
case 4: Demo003(); break;
}
// gameCondition=COUNTDOWN_INIT;
return(0);
}
int SM__COUNTDOWN_INIT()
{
totalCnt=0;
hitCnt=0;
outCnt=0;
karaburiCnt=0;
gameLevel=0;
cls();
printf("用意:3秒後開始\x0d");
gameCondition=COUNTDOWN;
AnswerTime=180;
PlayStartTime=ONTIME();
return(0);
}
int SM__COUNTDOWN()
{
int nt;
nt=ONTIME();
if( (PlayStartTime+AnswerTime)<=nt ){
//printf("はじめ");
gameCondition=PLAY_TRACK;
goto quick_exit;
}
quick_exit:
return(0);
}
int SM__PLAY_TRACK()
{
int tn; //tn
if( TPALET0!=0 ){ TPALET0=0; }
totalCnt++;
PrintInfo();
tn=rand()%VTRACKS; //0~VTRACKS
PlayNumber=tn;
prohiTime=0; //ASDF入力許可
AnswerTime=AnswerTimeTBL[gameLevel];//回答時間@@てきとー
if(DB)printf("vTrack No.=%d ",tn);
if(HINT)PrintAns(); //カンニング@@
PlayVTrack(tn); //鳴らす
PlayStartTime=ONTIME();
gameCondition=WAIT_ANSWER;
return(0);
}
int SM__WAIT_ANSWER()
{
int nt;
PrintSubInfo(1); //タイマー表示
nt=ONTIME();
if( (PlayStartTime+AnswerTime)<nt ){ //時間切れか?
gameCondition=TIMEOUT_ANSWER_INIT;
goto quick_exit;
}
//正解チェック
if( Dev.anskey!=0 ){
int *ht;
if(DB)printf("anskey=%d:",Dev.anskey);
ht=HitTable[Dev.anskey];
if(DB)printf("addr=%x:",ht);
gameCondition=BAD_ANSWER_INIT;
while( *ht!=-1 ){
if(DB)printf("%d:",*ht);
if( PlayNumber==*ht ){
gameCondition=GOOD_ANSWER_INIT;
break;
}
else{
ht++;
}
}
}
quick_exit:
return(0);
}
int SM__GOOD_ANSWER_INIT()
{
if(DB)printf("正解!");
ADPCMOUT(PCM_1005_001,0x0403,PCMSIZE_1005_001);
hitCnt++;
gameCondition=GOOD_ANSWER;
return(0);
}
int SM__GOOD_ANSWER()
{
gameCondition=WAIT_NEXT;
return(0);
}
int SM__BAD_ANSWER_INIT()
{
ADPCMOUT(PCM_AXE0004,0x0403,PCMSIZE_AXE0004);
karaburiCnt++;
prohiTime=prohiTimeTBL[gameLevel]; //@@入力禁止カウンタ
if(DB)printf("間違い?");
gameCondition=BAD_ANSWER;
return(0);
}
int SM__BAD_ANSWER()
{
// gameCondition=WAIT_NEXT;
gameCondition=WAIT_ANSWER;
return(0);
}
int SM__WAIT_NEXT()
{
int nt;
PrintInfo();
PrintSubInfo(0);
nt=ONTIME();
if( (PlayStartTime+AnswerTime)<=nt ){ //次の再生時間まで待つ
gameCondition=LEVEL_CONTROL;
// gameCondition=PLAY_TRACK;
goto quick_exit;
}
quick_exit:
return(0);
}
int SM__TIMEOUT_ANSWER_INIT()
{
TPALET0=0x0400; //画面赤
outCnt++;
gameCondition=TIMEOUT_ANSWER;
return(0);
}
int SM__TIMEOUT_ANSWER()
{
gameCondition=WAIT_NEXT;
return(0);
}
int SM__LEVEL_CONTROL()
{
int bo;
if( totalCnt==60 ){
gameCondition=GAMEOVER_INIT;
goto quick_exit;
}
#define CLRCHK (5)
if( (totalCnt%10)==0 ){ //次のレベルへ
bo=(hitCnt*10)/totalCnt;
if( bo>=CLRCHK ){
gameLevel++; //次のレベルへ
gameCondition=PLAY_TRACK;
}
else{
gameCondition=GAMEOVER_INIT;
}
}
else{
gameCondition=PLAY_TRACK;
}
quick_exit:
return(0);
}
#define GAMEOVER_TIME (60*10) //10sec
int GAMEOVER__local_counter;
int SM__GAMEOVER_INIT()
{
char *mes[7]={
NULL,
"次は頑張って", //10
"その調子で頑張れ", //20
"ここからが勝負", //30
"油断大敵…かな", //40
"頑張れ、もう少し", //50
"良く頑張りました" //60
};
ADPCMOUT(PCM_1005_003,0x0403,PCMSIZE_1005_003);
GAMEOVER__local_counter=0;
if( hitCnt>HiScore ){
HiScore=hitCnt;
}
printf("%s\n",mes[totalCnt/10]);
printf("こっそり教えちゃウ。からぶり回数は%d回よん\n",karaburiCnt);
printf("→↓GAME OVER↓←");
gameCondition=GAMEOVER;
return(0);
}
int SM__GAMEOVER()
{
GAMEOVER__local_counter++;
if( GAMEOVER__local_counter>GAMEOVER_TIME ){
gameCondition=DEMO_INIT;
if( TPALET0!=0 ){ TPALET0=0; }
}
// exit_flag=TRUE;
return(0);
}
int StepMan()
{
switch( gameCondition ){
case ALL_INIT: SM__ALL_INIT(); break;
case DEMO_INIT: SM__DEMO_INIT(); break;
case DEMO: SM__DEMO(); break;
case COUNTDOWN_INIT: SM__COUNTDOWN_INIT(); break;
case COUNTDOWN: SM__COUNTDOWN(); break;
case PLAY_TRACK: SM__PLAY_TRACK(); break;
case WAIT_ANSWER: SM__WAIT_ANSWER(); break;
case GOOD_ANSWER_INIT: SM__GOOD_ANSWER_INIT(); break;
case GOOD_ANSWER: SM__GOOD_ANSWER(); break;
case BAD_ANSWER_INIT: SM__BAD_ANSWER_INIT(); break;
case BAD_ANSWER: SM__BAD_ANSWER(); break;
case TIMEOUT_ANSWER_INIT:SM__TIMEOUT_ANSWER_INIT(); break;
case TIMEOUT_ANSWER: SM__TIMEOUT_ANSWER(); break;
case WAIT_NEXT: SM__WAIT_NEXT(); break;
case LEVEL_CONTROL: SM__LEVEL_CONTROL(); break;
case GAMEOVER_INIT: SM__GAMEOVER_INIT(); break;
case GAMEOVER: SM__GAMEOVER(); break;
}
return(0);
}
int main(argc,argv)
int argc;
char *argv[];
{
int res;
int tm=0;
char *mes[2]={
"終了しました",
"CD-ROMの準備等が出来ていないようです"
};
res=Init(argc,argv);
if( res<0 ){
tm=1;
goto quick_exit;
}
while( exit_flag!=TRUE ){
StepMan();
DevMan();
Idle();
SyncMan();
}
quick_exit:
Term(mes[tm]);
return(0);
}
/* [ EOF ] */